package cn.livingCloud.service.impl.operation;

import cn.livingCloud.wechat.protocol.req.TextMsg;
import cn.livingCloud.wechat.protocol.resp.Article;
import cn.livingCloud.wechat.protocol.resp.ArticlesRespMsg;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by sujiantang on 2015/12/17.
 */
public class AutoReplyArticleCreater {

    public ArticlesRespMsg articleCreater(TextMsg textMsg) {
        ArticlesRespMsg respMsg = new ArticlesRespMsg(textMsg);
        List<Article> articleList = new ArrayList<Article>();
        Article article = new Article();
        article.setTitle("测试标题");
        article.setDescription("测试正文");
        article.setPicUrl("https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/logo_white_fe6da1ec.png");
        article.setUrl("https://www.baidu.com");
        articleList.add(article);
        respMsg.setArticles(articleList);
        respMsg.setArticleCount(articleList.size());
        return respMsg;
    }
}
